package net.qiqb.usr.points.adapter.listener;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.qiqb.usr.custom.client.events.CreatedCustomEvent;
import net.qiqb.usr.points.application.CreatePointsCmd;
import net.qiqbframework.commandhandling.gateway.CommandGateway;
import net.qiqbframework.eventhandling.EventHandler;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@AllArgsConstructor
public class Point4CustomerListener {


    private final CommandGateway commandGateway;

    @EventHandler
    public void listenCreatedCustomEvent(CreatedCustomEvent createdCustomEvent) {
        // log.info("积分模块监听已经创建用户");
        //commandGateway.sendAndWait(new CreatePointsCmd(createdCustomEvent.getCustomerId()));
    }

}
